<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<html>
<head>
<title>Cadastro de Alunos</title>
<link href="css/estilo.css" rel="stylesheet" type="text/css">
</head>
<body>
<f:view>
	<h:form>
		<h:outputText styleClass="title" value="Cadastro de Alunos" />
		<br>
		<br>
		<rich:messages layout="table" infoLabelClass="messageInfo"
			errorLabelClass="messageError">
			<f:facet name="infoMarker">
				<h:graphicImage value="imagens/sucesso.gif" />
			</f:facet>
			<f:facet name="errorMarker">
			
				<h:graphicImage value="images/erro.gif" />
			</f:facet>
		</rich:messages>
		<h:panelGrid columns="3">
			<h:outputText value="Nome: " />
			<h:inputText id="Nome" value="#{alunoBean.aluno.nome}" size="30" required="true" />
			<h:message for="Nome" style="color: darkred" />

			<h:outputText value="Idade: " />
			<h:inputText id="Idade" value="#{alunoBean.aluno.idade}" />
			<h:message for="Idade" style="color: darkred" />
		</h:panelGrid>
			<h:commandButton value="Salvar" action="#{alunoBean.salvar}" />
			<h:commandButton value="Cancelar" action="cancelaAluno" immediate="true" />
			<h:commandButton value="Menu Principal" action="index" immediate="true" />
	</h:form>
</f:view>
</body>
</html>